#=The 'Activation follows mouse (X-Mouse)' option if checked, gives focus to any window to which you point your mouse, but doesn't raise the window to the foreground unless you check the second option in this page.
#=\nIf the 'Autoraise when activating' option is also checked, it brings the window that has focus to the foreground.
#=\nActivation delay (ms). Specifies the delay (in milliseconds) before XP brings the window to which you pointed to the foreground.
#=\nNote: X-Mouse can be fun at first but annoying after a while.
'UserPreferencesMask is an example of a REG_DWORD value disguised as a REG_BINARY value. When you see a 32-bit binary value, chances are, it's really a double-word value. In that case, you can safely replace the value with a REG_DWORD. Don't forget that Windows XP uses the little-endian architecture, though, so it stores double-word values in reverse-byte order.
'In other words, you replace the REG_BINARY value 0x04 0x03 0x02 0x01 with the REG_DWORD 0x01020304.
Sub OnInit()
Dim s, i, b
s= RegReadValue(strkey1)
b =Left(s,2) 'get the first byte
s = Mid(s ,3) ' store the rest
i = CLng("&H" & b)
if i And 1 then CheckItem 0, true
'f i And &H40 then CheckItem 1, true
SetItemText 2, RegReadValue(strkey3)
End Sub
Sub OnApply(x,y)
Dim s, i, b
s= RegReadValue(strkey1)
b =Left(s,2) 'get the first byte
s = Mid(s ,3) ' store the rest
i = CLng("&H" & b)
if IsItemChecked(0) then
i = i Or 1
if IsItemChecked(1) then
i = i Or &H40
end if
else
i = i And (NOT &H1)
i = i And (NOT &H40) ' i = i & ~0x40
end if
s =right(hex(i),2) & s ' right is used to limit it to a byte